import request from '@/utils/request'

export function getWarehouse(query) {
	if (query == null) {
		query = {};
	}
	return request({
		url: "/backstage/warehouse/list",
		method: "POST",
		data: query
	})
}


export function getWarehouseInfo(id) {
	return request({
		url: `/backstage/warehouse/${id}`,
		method: "GET"
	})
}


export function createWarehouse(query) {
	return request({
		url: `/backstage/warehouse`,
		method: "POSt",
		data: query
	})
}

export function updateWarehouse(query) {
	return request({
		url: `/backstage/warehouse/edit`,
		method: "POST",
		data: query
	})
}


export function deleteManyWarehouse(query) {
	return request({
		url: `/backstage/warehouse/delete`,
		method: "DElETE",
		data: query
	})
}

export function inventoryWarehouse(query) {
	return request({
		url: `/backstage/warehouse/inventory`,
		method: "POST",
		data: query
	})
}

export function stockInventory(query) {
	return request({
		url: `/backstage/warehouse/listWPR`,
		method: 'post',
		data:query
	})
}
